import serial

# 设置串口参数
ser = serial.Serial(port='COM5', baudrate=56000, timeout=1)

# 发送数据
send_data = "Hello, Virtual COM Port!"
ser.write(send_data.encode('utf-8'))
print("Sent:", send_data)
